<template>
    <component
        :is="h(ElButton, { ...props, color: themeStore.primaryColor, dark: themeStore.layoutColorMode === 2 }, $slots.default)">
    </component>
</template>

<script lang="ts" setup>
import { h } from 'vue'
import { ElButton } from 'element-plus';
import { useThemeStore } from '@/stores'
import { type ButtonProps } from 'element-plus'
const props = defineProps<ButtonProps>()
const themeStore = useThemeStore()
</script>
<style scoped lang='less'>
.el-button:not(.is-plain) {
    color: #fff;
}
</style>